package com.yidao.app.service;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.InitializingBean;

import com.yidao.app.domain.AppContext;
import com.yidao.menu.service.MenuFactory;

public class AppService implements InitializingBean {

	private Logger log = Logger.getLogger(AppService.class);

	private AppContext appContext;

	private MenuFactory menuFactory;

	@Override
	public void afterPropertiesSet() throws Exception {
		appContext.addConextProperty(AppContext.PROP_MENU, menuFactory.createMenu());
	}

	public AppContext getAppContext() {
		return appContext;
	}

	public MenuFactory getMenuFactory() {
		return menuFactory;
	}

	public void setAppContext(AppContext appContext) {
		this.appContext = appContext;
	}

	public void setMenuFactory(MenuFactory menuFactory) {
		this.menuFactory = menuFactory;
	}
}
